<% if @user_story.size == 0 %>
Es sind noch keine UserStories verfügbar.
<% else %>

<% @user_story.each do |story| %>
	<div class="userStory" id="userStory_<%= story.id %>">
		<div class="status status_<%= story.user_story_state_pid %>"></div>
		<div class="rating">
			<%= 
				if story.user_story_rating_id == nil 
					"?"
				else 
					UserStoryRating.find_by_id(story.user_story_rating_id).rating
				end 
			%>
		</div>
		<span class="hint userStoryId">#<%= story.id %></span>
		<h3><%= story.headline %></h3>
		
		<p>
			<%= story.description %>
		</p>
		
		<p>
			<span class="hint">Zuletzt aktualisiert am <%= story.updated_at.to_formatted_s(:short) %>. Priorität: <%= UserStoryPriority.find_by_id(story.user_story_priority_pid).priority %></span>
		</p>
	</div>
<% end %>

<% end %>
